This section provides background information related to the present disclosure which is not necessarily prior art.
In a network, two or more equivalent links exist from a certain node to a destination, which requires a uniform distribution of data flow on the links according to a certain rule during forwarding. A HASH algorithm is usually adopted. This algorithm makes all circumstances occur as evenly as possible by a hash method. Besides, in most cases, the flow needs to be transmitted in order, so as to avoid disorder.
For example, in a router, every forwarding protocol and service employs a corresponding fixed HASH algorithm, so that a load balancing effect is achieved on the equivalent links and the flow is uniformly hashed on every link. A controlling plane transfers various types of information therein to a forwarding table. A forwarding plane completes a traffic calculation and relevant data forwarding according to the forwarding table.
In order to make the distribution of the flow as uniform as possible, every service selects an optimal HASH source to perform a hash. The HASH source is a value for performing the HASH calculation. However, different providers and customers may require the flow to be distributed on the equivalent links according to different rules.
FIG. 1 is a schematic view illustrating a connection of multiple links of a PWE3 network in the prior art. The PWE3 network includes customer edges CE1, CE2 and provider edge routers PE1, PE2. The PWE3 network provides a tunnel on a packet switched network to emulate the Layer 2 VPN protocol of some services. The conventional network and the packet switched network may be interconnected through this protocol to realize the resource sharing and network expansion. As shown in the figure, a flow is on PE1. Multiple equivalent links (i.e., pseudo wires PW1, PW2, . . . ) of a Multiprotocol Label Switching (MPLS) tunnel are connected to PE2. At this time, the flow must select one of the links for transmission. The hash can be performed in the following three manners.
1) The HASH is performed according to IP addresses and the flow with the same source IP and destination IP is on the same link.
2) The HASH is performed according to virtual circuit labels (VC_LABELs) and the flow of the same link PW is on the same link.
3) The HASH is performed according to physical addresses MACs of Ethernet devices and the flow with the same Layer 2 address is on the same link.
In the router, the flow algorithm is fixed, so that only one of the load balancing methods can be used. The above three algorithms have different emphases on balance of load, and thus generate different degrees and effects of flow uniformity. Moreover, different customers may have varied requirements of the distribution of the flow on an intermediate node of the PE. Thereby, the prior art fails to meet the requirements from different customers of the transmission of the flow on the load balancing link.